package com.aizhixin.lab.project.template.entity;

import com.aizhixin.lab.common.entity.AbstractStringIdAndCreatedDateEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Temporal;
import java.util.Date;

@Entity(name = "t_exercises_file")
@Data
public class ExercisesFile {
    @Id
    @Column(name = "id")
    private String id;

    @CreatedDate
    @Column(name = "created_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdDate = new Date();

    @Column(name = "task_id")
    private String taskId;
    @Column(name = "exercises_choice_id")
    private String exercisesChoiceId;
    @Column(name = "exercises_question_id")
    private String exercisesQuestionId;
    @Column(name = "file_name")
    private String fileName;
    @Column(name = "file_url")
    private String fileUrl;
    @Column(name = "file_key")
    private String fileKey;
    @Column(name = "source")
    private String source;//附件文件所属来源[question:题干,choice:选项,answer:答案,analysis:解析]
    @Column(name = "order_num")
    private Integer orderNum;
}
